package cn.com.mapper;

import cn.com.beans.PRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {

    int deleteByIds(@Param("ids") Integer...ids);

    int insert(PRole role);

    List<PRole> findAll(PRole role);

    PRole findByid(Integer id);

    int update(PRole role);


    List<PRole> findByAccountId(@Param("roleId") Integer roleId);

    void unBindRole(@Param("accountId") Integer accountId);

    void bindRole(@Param("accountId") Integer accountId, @Param("roleIds") Integer[] roleIds);


}
